package io.gitee.caoxiaoyu97.log4j.defender.properties;

import org.springframework.util.StringUtils;

public class DefenderKeyProperties {
    private String keys;
    private String splitter = ",";
    private Integer remainprefix = Integer.valueOf(0);
    private Integer remainsuffix = Integer.valueOf(0);
    private String markchar = "******";

    public String getKeys() {
        return this.keys;
    }

    public void setKeys(String keys) {
        this.keys = keys;
    }

    public String getSplitter() {
        return StringUtils.isEmpty(this.splitter) ? "," : this.splitter;
    }

    public void setSplitter(String splitter) {
        this.splitter = splitter;
    }

    public Integer getRemainprefix() {
        return Integer.valueOf((null == this.remainprefix || this.remainprefix.intValue() < 0) ? 0 : this.remainprefix.intValue());
    }

    public void setRemainprefix(Integer remainPrefix) {
        this.remainprefix = remainPrefix;
    }

    public Integer getRemainsuffix() {
        return Integer.valueOf((null == this.remainsuffix || this.remainsuffix.intValue() < 0) ? 0 : this.remainsuffix.intValue());
    }

    public void setRemainsuffix(Integer remainSuffix) {
        this.remainsuffix = remainSuffix;
    }

    public String getMarkchar() {
        return StringUtils.isEmpty(this.markchar) ? "******" : this.markchar;
    }


    public void setMarkchar(String markChar) {
        this.markchar = markChar;
    }
}
